<!DOCTYPE HTML>
<html>
<script>

window.onload = function() {
  document.querySelector('div').addEventListener('contextmenu', function() {
    window.success = true;
  });
};

</script>
<body>
<div>DIV</div>
</body>
</html>
